﻿<Window x:Class="LoghogInterface.SettingsEdit"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:res="clr-namespace:LoghogInterface.Properties"
        xmlns:my="clr-namespace:LoghogInterface"
        Title="{x:Static res:Resources.SetEdit}" Height="358" Width="731" MinHeight="300" MinWidth="700">
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="10" />
            <RowDefinition Height="306*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="10" />
            <ColumnDefinition Width="210" />
            <ColumnDefinition Width="10" />
            <ColumnDefinition Width="481*" />
        </Grid.ColumnDefinitions>
        <Grid.Resources>
            <my:BoolToVisibilityConverter x:Key="BoolToVis" />
        </Grid.Resources>
        <ListBox Name="listBox1" Grid.Column="1" Grid.Row="1">
            <ListBoxItem Name="LBLawUser" Content="{x:Static res:Resources.EditLawGroup}" />
            <ListBoxItem Name="LBGroupUser" Content="{x:Static res:Resources.GroupUsers}" />
            <ListBoxItem Name="LBEMail" Content="{x:Static res:Resources.Mail}" />
            <ListBoxItem Name="LBTag" Content="{x:Static res:Resources.SetTags}" />
            <ListBoxItem Name="LBBD" Content="{x:Static res:Resources.ConSQL}" />
        </ListBox>
        <!--Права пользователей-->

        <Grid  HorizontalAlignment="Left"  Name="GLawUser" VerticalAlignment="Top"  Visibility="{Binding IsSelected, ElementName=LBLawUser,Converter={StaticResource BoolToVis}}" Grid.Column="3" Grid.Row="1">
            <DataGrid>
                <DataGrid.Columns>
                    <DataGridTextColumn Header="{x:Static res:Resources.Users}"  />
                    <DataGridCheckBoxColumn Header="{x:Static res:Resources.Read}"    />
                    <DataGridCheckBoxColumn Header="{x:Static res:Resources.Add}"  />
                    <DataGridCheckBoxColumn Header="{x:Static res:Resources.Export}"  />
                    <DataGridCheckBoxColumn Header="{x:Static res:Resources.Import}"  />
                    <DataGridCheckBoxColumn Header="{x:Static res:Resources.AddCollum}"  />
                    <DataGridCheckBoxColumn Header="{x:Static res:Resources.DelCollum}"  />
                    <DataGridCheckBoxColumn Header="{x:Static res:Resources.AddUsers}"  />
                    <DataGridCheckBoxColumn Header="{x:Static res:Resources.DelUsers}"  />
                    <DataGridCheckBoxColumn Header="{x:Static res:Resources.CreateGroup}"  />
                    <DataGridCheckBoxColumn Header="{x:Static res:Resources.DelGroup}"  />
                    <DataGridCheckBoxColumn Header="{x:Static res:Resources.CreateJournal}"  />
                    <DataGridCheckBoxColumn Header="{x:Static res:Resources.DelJournal}"  />
                </DataGrid.Columns>
            </DataGrid>
        </Grid>
        <!--Группы пользователей-->
        <Grid Name="GGroupUser" Visibility="{Binding IsSelected, ElementName=LBGroupUser,Converter={StaticResource BoolToVis}}" Grid.Column="3" Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="10" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="10" />
                <RowDefinition Height="30" />
                <RowDefinition Height="197*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="130*" />
                <ColumnDefinition Width="10" />
                <ColumnDefinition Width="75" />
                <ColumnDefinition Width="10" />
                <ColumnDefinition Width="130*" />
                <ColumnDefinition Width="10" />
                <ColumnDefinition Width="75" />
                <ColumnDefinition Width="10" />
            </Grid.ColumnDefinitions>
            <Label Content="{x:Static res:Resources.Groups}" Grid.Row="1" />
            <ListBox Name="LBGroups"  Grid.Row="2" Grid.RowSpan="4">
                <ListBoxItem Content="Администраторы" />
            </ListBox>
            <Label Content="{x:Static res:Resources.Users}"  Grid.Column="4" Grid.Row="1" />
            <ListBox Name="LBUsers" Grid.Column="4" Grid.Row="2" Grid.RowSpan="4">
                <ListBoxItem Content="User1" />
                <ListBoxItem Content="Admin1" />
            </ListBox>
            <Button Content="{x:Static res:Resources.toAdd}" Name="BAddUser" Grid.Column="6" Grid.Row="2"  />
            <Button Content="{x:Static res:Resources.toDel}" Name="BDelUser" Grid.Column="6" Grid.Row="4"  />
            <Button Content="{x:Static res:Resources.toAdd}" Name="BAddGroup" Grid.Column="2" Grid.Row="2" />
            <Button Content="{x:Static res:Resources.toDel}" Name="BDelGroup"  Grid.Column="2" Grid.Row="4" />
        </Grid>
        <!--Настройки почты-->
        <Grid Name="GEMail" Visibility="{Binding IsSelected, ElementName=LBEMail,Converter={StaticResource BoolToVis}}" Grid.Column="3" Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="380*" />
                <ColumnDefinition Width="100" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="92*" />
            </Grid.RowDefinitions>
            <Label Content="{x:Static res:Resources.SerAdress}" Grid.ColumnSpan="2" />
            <TextBox Name="TSerAdress" Grid.Row="1" Grid.ColumnSpan="2">
                mail
            </TextBox>
            <Label Content="{x:Static res:Resources.Port}" Grid.Row="2" Grid.ColumnSpan="2" />
            <TextBox Name="TPort" Grid.Row="3" Grid.ColumnSpan="2">
                12345
            </TextBox>
            <Label Content="{x:Static res:Resources.Adress}" Grid.Row="4" Grid.ColumnSpan="2" />
            <TextBox Name="TAdress" Grid.Row="5" Grid.ColumnSpan="2">
                example@mail.ru
            </TextBox>
            <Label Content="{x:Static res:Resources.Filt}" Grid.Row="6" Grid.ColumnSpan="2" />
            <Button Content="{x:Static res:Resources.toAdd}" Click="BAddFiltr_Click" Name="BAddFiltr" Grid.Row="7" Grid.Column="1" Height="30" 
                    HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,10,0,0" />
            <ListBox Grid.Row="7" Name="listBox2">
                <ListBoxItem>Важное</ListBoxItem>
                <ListBoxItem>Галактика</ListBoxItem>
            </ListBox>
        </Grid>
        <!--Настройки тэгов-->
        <Grid Name="GTags" Visibility="{Binding IsSelected, ElementName=LBTag,Converter={StaticResource BoolToVis}}" Grid.Column="3" Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="252*" />
            </Grid.RowDefinitions>
            <Label Content="{x:Static res:Resources.Tags}" Grid.Row="0" />
            <ToolBar Name="toolBar1"  Grid.Row="1">
                <Button Content="{x:Static res:Resources.AddTypeTag}"   Name="BAddTTeg"  />
                <Button Content="{x:Static res:Resources.AddTag}"  Name="BAddTeg"   />
                <Button Content="{x:Static res:Resources.toDel}"  Name="BDel"   />
                <Button Content="{x:Static res:Resources.Set}"  Name="BSet"  />
            </ToolBar>
            <ListBox Name="LBTags" Grid.Row="2">
                <ListBoxItem Content="Важное" />
                <ListBoxItem Content="Галактика" />
            </ListBox>
        </Grid>
        <!--Настройки подключения к БД-->
        <Grid Name="GBD" Visibility="{Binding IsSelected, ElementName=LBBD,Converter={StaticResource BoolToVis}}" Grid.Column="3" Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="10" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="10" />
                <RowDefinition Height="30" />
                <RowDefinition Height="65*" />
            </Grid.RowDefinitions>
            <Label Content="{x:Static res:Resources.ConnectTo}"  Name="label2"  Grid.Row="1" />
            <TextBox   Name="TSerBD" Grid.Row="2">
                User-PC
            </TextBox>
            <Label Content="{x:Static res:Resources.User}" Name="label1" Grid.Row="3" />
            <TextBox Name="textBox1" Grid.Row="4">
                User
            </TextBox>
            <Label Content="{x:Static res:Resources.Password}" Name="label3"  Grid.Row="5"  />
            <TextBox Name="textBox2" Grid.Row="6">
                *******
            </TextBox>
            <Button Content="{x:Static res:Resources.Connect}"  Grid.Row="8" HorizontalAlignment="Left" VerticalAlignment="Stretch" Name="BCon" />
            <Button Content="{x:Static res:Resources.Disconnect}" HorizontalAlignment="Left" Margin="85,0,0,0" Name="BDCon" Grid.Row="8" />
            <Button Content="{x:Static res:Resources.ConLog}" HorizontalAlignment="Left" Margin="160,0,0,0" Name="BConLog"  Grid.Row="8" />
        </Grid>
    </Grid>
</Window>
